﻿
using System;

namespace PhoneUI.Com.Modle
{
    public sealed class ScTask : IComparable
    {
        /// <summary>
        /// 派工单ID
        /// </summary>
        public int taskid { get; set; }
        /// <summary>
        /// 派工单号
        /// </summary>
        public string taskcode { get; set; }
        /// <summary>
        /// 指令单号
        /// </summary>
        public string ordercode { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string mtrlcode { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string mtrlname { get; set; }
        /// <summary>
        /// 物料规格
        /// </summary>
        public string mtrlmode { get; set; }
        /// <summary>
        /// 工组编码
        /// </summary>
        public string wrkgrpcode { get; set; }
        /// <summary>
        /// 工组名称
        /// </summary>
        public string wrkgrpname { get; set; }
        /// <summary>
        /// 工序编号
        /// </summary>
        public string procode { get; set; }
        /// <summary>
        /// 工序名称
        /// </summary>
        public string proname { get; set; }
        /// <summary>
        /// 申请质检时间
        /// </summary>
        public DateTime? prechkdate { get; set; }
        /// <summary>
        /// 质检结果
        /// </summary>
        public byte chkrsltflag { get; set; }
        /// <summary>
        /// 质检申请人
        /// </summary>
        public string prechkempname { get; set; }
        /// <summary>
        /// 质检申请备注
        /// </summary>
        public string prechkdscrp { get; set; }
        /// <summary>
        /// 工价
        /// </summary>
        public decimal workprice { get; set; }
        /// <summary>
        /// 车/袋号
        /// </summary>
        public string carcode { get; set; }
        /// <summary>
        /// 仓位
        /// </summary>
        public string locode { get; set; }
        /// <summary>
        /// 其它
        /// </summary>
        public string othercode { get; set; }
        /// <summary>
        /// 工组ID
        /// </summary>
        public int wrkgrpid { get; set; }
        /// <summary>
        /// 生产指令相关号
        /// </summary>
        public string relCode { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public decimal qty { get; set; }
        /// <summary>
        /// 相关主生产计划号
        /// </summary>
        public string porderCode { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        public DateTime? orderDate { get; set; }
        /// <summary>
        /// 出货时间
        /// </summary>
        public DateTime? requireDate { get; set; }
        /// <summary>
        /// 配置(产品规格)
        /// </summary>
        public string statusMode { get; set; }
        /// <summary>
        /// 配置1(产品信息)
        /// </summary>
        public string woodCode { get; set; }
        /// <summary>
        /// 配置2(生产说明)
        /// </summary>
        public string pCode { get; set; }
        /// <summary>
        /// 质检人
        /// </summary>
        public string chkEmp { get; set; }
        /// <summary>
        /// 质检日期
        /// </summary>
        public string chkDate { get; set; }
        /// <summary>
        /// 劳动强度
        /// </summary>
        public string worklevel { get; set; }
        /// <summary>
        /// 配置的个性名称
        /// </summary>
        public string[] optionValue { get; set; }
        /// <summary>
        /// 销售订单号
        /// </summary>
        public string saleTaskCode { get; set; }

        #region IComparable Members

        public int CompareTo(object obj)
        {
            var another = obj as ScTask;
            return this.chkrsltflag > another.chkrsltflag ? 1 : 0;
        }

        #endregion
    }
}